package com.spring.ai.config;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.License;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Bean;
import io.swagger.v3.oas.models.info.Info;
/**
 * Swagger-OpenApi
 */
@Configuration
public class OpenApiConfig {

    @Bean
    public OpenAPI customOpenAPI() {
        return new OpenAPI()
                .info(new Info()
                        .title("空门医疗 API 文档")
                        .version("1.0")
                        .description("这是基于 springdoc-openapi 的 API 文档示例")
                        .termsOfService("https://example.com/terms")
                        .license(new License().name("Apache 2.0").url("https://springdoc.org")));
    }

}
